package 单例模式.饿汉式;

public class Singleton {
    private static Singleton singleton = new Singleton();
    private Singleton(){}

    public static Singleton getInstance(){
        return singleton;
    }

    public static void main(String[] args) {
        System.out.println(Singleton.getInstance() ==Singleton.getInstance());
    }
}
